package com.example.administrator.xiaoxiang.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.administrator.xiaoxiang.R;

public class VoucherActivity extends AppCompatActivity {


    private String title[] = {"现金券", "免息卷"};
    private TextView text;
    private TextView tv;
    private ImageView iv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_voucher);
        init();
    }
    private void init() {

        text = (TextView) findViewById(R.id.vou_title_text);
        tv= (TextView) findViewById(R.id.vou_text_btn);
        iv= (ImageView)findViewById(R.id.vou_black_img_btn);
        Intent intent = getIntent();
        String iddata = intent.getStringExtra("id");

            Log.d("1620", "" + iddata);
            if (iddata.equals("ic4")) {
                text.setText(title[0]);
                text.setTextSize(20);
            } else {
                text.setText(title[1]);
                text.setTextSize(20);
            }

    }
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.vou_black_img_btn:
                 finish();

                break;
            case R.id.vou_text_btn:
                Toast.makeText(this, "使用说明", Toast.LENGTH_SHORT).show();

                break;
        }
    }
}
